<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/Css/style.css" />
    <script type="text/javascript" src="__PUBLIC__/Admin/Js/jquery.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/Js/bootstrap.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/Js/ckform.js"></script>
    <script type="text/javascript" src="__PUBLIC__/Admin/Js/common.js"></script>

 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="{:U('Admin/index/handleEdit')}" method="post" class="definewidth m20">
<input type="hidden" name="id" value={$userInfo.id} />
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">登录账号</td>
            <td><label >{$userInfo.account}</label></td>
        </tr>
        <tr>
            <td class="tableleft">密码</td>
            <td><input class="input_text" type="text" name="password" value={$userInfo.password}></td>
        </tr>
        <tr>
            <td class="tableleft">用户名</td>
            <td><input class="input_text" type="text" name="username" value={$userInfo.username}></td>
        </tr>
        <tr>
            <td class="tableleft">邮箱</td>
            <td><input class="input_text" type="text" name="email" value={$userInfo.email}></td>
        </tr>
        <tr>
            <td class="tableleft">状态</td>
            <td>
                <input type="radio" name="status" value="1"
                    <eq name="userInfo.status" value='1'>checked</eq> /> 启用
              <input type="radio" name="status" value="0"
                    <eq name="userInfo.status" value='0'>checked</eq> /> 禁用
            </td>
        </tr>
        <tr>
            <td class="tableleft">角色</td>
            <td>{$role_checkbox}</td>
        </tr>
        <tr>
            <td class="tableleft"></td>
            <td>
                <button type="submit" class="btn btn-primary" id="s_btn" type="button">保存</button>				 &nbsp;&nbsp;<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="{:U('Admin/index/indexUser','','')}";
		 });

        //button 提交非空验证
        $('#s_btn').click(function(){
            var flag=0;
            $(".input_text").each(function(){
                if($(this).val() == ''){
                    flag=1;
                    $(this).focus();
                }});
                if(flag==1){
                    alert("内容不能为空！");
                    return false;
                }
            });
    });
</script>